package org.chen.mybatis.utils;

import org.chen.spring.core.annotation.ConfigurationProperties;
import org.chen.spring.core.constant.PropertiesConstant;

/**
 * Mysql配置信息
 *
 * @author Chen
 * @since 2023/6/9 10:48
 */
@ConfigurationProperties(prefix = PropertiesConstant.PREFIX_NAME + "dataSource")
public class ConnectionProperties {

    private String url;

    private String username = "root";

    private String password;

    private String port = "3306";

    private String driverClassName = "com.mysql.cj.jdbc.Driver";

    public ConnectionProperties(String url, String username, String password, String port, String driverClassName) {
        this.url = url;
        this.username = username;
        this.password = password;
        this.port = port;
        this.driverClassName = driverClassName;
    }

    public ConnectionProperties() {

    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getPort() {
        return port;
    }

    public void setPort(String port) {
        this.port = port;
    }

    public String getDriverClassName() {
        return driverClassName;
    }

    public void setDriverClassName(String driverClassName) {
        this.driverClassName = driverClassName;
    }
}
